#pragma once
#include <httprequesthandler.h>
using namespace stefanfrings;
/**
  The request handler receives incoming HTTP requests and generates responses.
*/

class RequestHandler : public HttpRequestHandler {
    Q_OBJECT
    Q_DISABLE_COPY(RequestHandler)
public:

    RequestHandler(QObject* parent=0);

    ~RequestHandler();

    void service(HttpRequest& request, HttpResponse& response);

};


class FileUploadHandler : public HttpRequestHandler {
	Q_OBJECT
		Q_DISABLE_COPY(FileUploadHandler)
public:

	FileUploadHandler(QObject* parent = 0) {};

	~FileUploadHandler();

	void service(HttpRequest& request, HttpResponse& response)override;

};

///////////HelloRequestHandler////////////

class HelloRequestHandler : public HttpRequestHandler {
	Q_OBJECT
		Q_DISABLE_COPY(HelloRequestHandler)
public:

	explicit HelloRequestHandler(QObject* parent = 0);

	~HelloRequestHandler();

	void service(HttpRequest& request, HttpResponse& response) override;

};

///////////ListRequestHandler////////////

class ListRequestHandler : public HttpRequestHandler {
	Q_OBJECT
		Q_DISABLE_COPY(ListRequestHandler)
public:

	explicit ListRequestHandler(QObject* parent = 0);

	~ListRequestHandler();

	void service(HttpRequest& request, HttpResponse& response) override;

};

///////////LoginRequestHandler////////////

class LoginRequestHandler : public HttpRequestHandler {
	Q_OBJECT
		Q_DISABLE_COPY(LoginRequestHandler)
public:

	explicit LoginRequestHandler(QObject* parent = 0);

	~LoginRequestHandler();

	void service(HttpRequest& request, HttpResponse& response) override;

};

///////////LoginPlusRequestHandler////////////

class LoginPlusRequestHandler : public HttpRequestHandler {
	Q_OBJECT
		Q_DISABLE_COPY(LoginPlusRequestHandler)
public:

	explicit LoginPlusRequestHandler(QObject* parent = 0);

	~LoginPlusRequestHandler();

	void service(HttpRequest& request, HttpResponse& response) override;

};


///////////StateTestRequestHandler////////////

class StateTestRequestHandler : public HttpRequestHandler {
	Q_OBJECT
		Q_DISABLE_COPY(StateTestRequestHandler)
public:

	explicit StateTestRequestHandler(QObject* parent = 0);

	~StateTestRequestHandler();

	void service(HttpRequest& request, HttpResponse& response) override;

};


///////////JsonTestRequestHandler////////////

class JsonTestRequestHandler : public HttpRequestHandler {
	Q_OBJECT
		Q_DISABLE_COPY(JsonTestRequestHandler)
public:

	explicit JsonTestRequestHandler(QObject* parent = 0);

	~JsonTestRequestHandler();

	void service(HttpRequest& request, HttpResponse& response) override;

};




